import bottomBar from "./components/bottom_bar.vue"
export default {
  data() {
    return {
      content: "<h1>产地四川省调查</h1>",
      myLocation: {},
      id: "",
      dataDetail: {},
      info: false
    };
  },
  mounted() {
    this.id = this.$route.params.id;
    this.myLocation = JSON.parse(localStorage.getItem("myLocation"));
    this.getData();
  },
  methods: {
    getData() {
      $http.get("plugin.be-within-call.frontend.index.ability", { 
        lng: this.myLocation ? this.myLocation.point.lng : "",
        lat: this.myLocation ? this.myLocation.point.lat : "",
        aid: this.id
      }).then(({ data , result , msg }) => {
        if (result) {
          this.dataDetail = data;
          this.info = true;
        } else {
          this.$toast(res.msg);
        }
      });
    },
  },
  components: { bottomBar }
};
